Maximum entropy thermodynamics